﻿using Gp.AI;
using Gp.Scripts.Core;
using Gp.Scripts.Core.Unit;
using Gp.Scripts.Data;
using Sirenix.OdinInspector;
using Sirenix.Utilities;
using UnityEngine;
using UnityEngine.Serialization;

namespace Gp.Scripts.Database {
    [GlobalConfig("Assets/AAA/Config")]
    public class LevelObjectConfigDatabase : GlobalConfig<LevelObjectConfigDatabase> {
        public const string PersistentSceneName = "Persistent";

        public const string PersistentSceneFilePath = "Assets/AAA/Scenes/Architecture/Persistent.unity";
        
        public new static LevelObjectConfigDatabase Instance =>
# if UNITY_EDITOR
            GlobalConfig<LevelObjectConfigDatabase>.Instance;
# else
            SystemDatabaseLoader.Instance.GetConfig<LevelObjectConfigDatabase>();
# endif
        
        
        
        // [Title("预制件配置")] 
        // [LabelText("单位布局预制件")]
        // public UnitPlaceHolder placeHolderPrefab;
        // [FormerlySerializedAs("battleScenePrefab")] [FormerlySerializedAs("gameLevelPrefab")] [LabelText("关卡预制件")]
        // public GameSettle battleSettlePrefab;


        [Title("基础数据配置")] 
        [LabelText("战斗数值基础")]
        public BasicRuleConfig basicConfig;

        // [LabelText("教程节点配置")] public List<TutorialInfoConfigs> tutorialConfigs;
        
            
        [LabelText("默认武器")]
        public ConfigWeapon defaultWeapon;

        [LabelText("骨灰")]
        public LootInventory deathLootPrefab;


        [Title("战斗 AI 配置")] 
        [LabelText("通用战斗AI")]
        public UnitAIBrainPreset defaultGeneric;
        [LabelText("远程战斗AI")]
        public UnitAIBrainPreset defaultRanged;
        [LabelText("近战战斗AI")]
        public UnitAIBrainPreset defaultMelee;


        [Title("库存系统配置")] 
        [LabelText("物品类型略缩图")]
        public Sprite[] itemThumb;
    }
}